<?php

// +----------------------------------------------------------------------
// | ThinkAdmin
// +----------------------------------------------------------------------
// | 版权所有 2014~2020 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://demo.thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | gitee 代码仓库：https://gitee.com/zoujingli/ThinkAdmin
// | github 代码仓库：https://github.com/zoujingli/ThinkAdmin
// +----------------------------------------------------------------------

namespace app\index\controller;

use function PHPSTORM_META\type;
use think\admin\Controller;


/**
 * Class Index
 * @package app\index\controller
 */
class Index extends BaseController
{

    public static $news_category_id = 15;   //行业动态
    public static $policy_category_id = 22; //法律法规
    public static $product_category_id = 28; //产品设备
    public static $edu_category_id = 16; //培训教育
    public static $aboutus_notice_category_id = 19; //通知公告
    public static $aboutus_news_category_id = 30; //协会动态
    public static $carousel_category_id = 14; //轮播图片
    /**
     * 首页显示 3行内容
     * 第一行：协会工作（通知公告，协会动态），教育培训
     * 第二行：行业动态，政策法规
     * 第三行：产品介绍
     */
    public function index()
    {
        $this->title = '首页';
        $this->redirect("/admin");
        $this->fetch();
    }

    public function demo1()
    {
        $this->title = '首页样式1';
        $this->fetch();
    }

    public function demo2()
    {
        $this->title = '首页样式2';
        $this->fetch();
    }

    public function demo3()
    {
        $this->title = '首页样式2';
        $this->fetch();
    }

    public function json(){
        $stu = array(
            "name" => "figol",
            "age" => 31,
        );
        $this->success($stu);
    }

}